home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1676 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.7 KB

  1. Subject: How to use 'diff' (was Re: Sticky Text Patches)
  2. Date: Mon, 4 Jul 1994 09:30:37 -0400 (EDT)
  3. From: Chris Herborth <herborth@53iss6.waterloo.ncr.com>
  4. In-Reply-To: <94Jul1.125546mesz.209301@hphalle0.informatik.tu-muenchen.de> from "Stephan Haslbeck" at Jul 1, 94 01:55:38 pm
  5. Message-Id:  <9407040934.ac19135@ncrhub1.NCR.COM>
  6.  
  7. What you wrote:
  8. > So I added some prot_temp()-calls in fork_restore(), and now it 
  9. > works fine. I've marked the lines below (Sorry, no diff, because I
  10. > don't know (yet) how to use it).
  11.  
  12. How To Use Diff
  13.  
  14. 1) BEFORE you edit foo.c, do this:
  15.    - mv foo.c foo.c.orig
  16.    - cp foo.c.orig foo.c
  17.    This leaves you with an unaltered original.  This is very important!
  18.  
  19. 2) AFTER you're done editing foo.c (ie, you've hacked it, tested it,
  20.    it works properly), do this:
  21.    - diff -c foo.c.orig foo.c > foo.diff
  22.  
  23. -c means "context", which gives the changes a little extra info so
  24. patch can figure out what to do if you try to use the diffs on a changed
  25. file.
  26.  
  27. Now you've got a nice context-diff in the file foo.diff; the changes in
  28. foo.diff can be applied by going:
  29.  
  30. patch -l < foo.diff
  31.  
  32. -l means "loose", which ignores end-of-line differences; very handy if
  33. some of your tools do silly things like converting the UNIX text to DOS
  34. text (@#$@# MicroEMACS 3.11 does this, my unreleased MiNT port of 3.12
  35. doesn't).
  36.  
  37. > P.S. This is the first time I mail to this list, so tell me if I did
  38. >      something wrong.
  39.  
  40. Looked fine to me (but I didn't check your code; I'm not a kernel hacker)!
  41.  
  42. -- 
  43. ----------========================_   /\ ============================----------
  44. Chris Herborth                    \`o.0'       herborth@53iss6.Waterloo.NCR.COM
  45. Information Products Developer    =(___)=
  46. AT&T Global Information Solutions    U
  47.